<?php

import('com.yamvc.controller.IAction');
import('com.yamvc.controller.Action');
import("com.yamvc.view.View");
import("com.yamvc.model.Model");
import("com.yamvc.application.events.ApplicationEvent");
import("com.simpleApplication.view.ApplicationMediator");
import("com.simpleApplication.view.MenuMediator");
import("com.simpleApplication.view.PageMediator");
import("com.simpleApplication.model.PagesDataProxy");

class DefaultAction extends Action implements IAction {
	
	public function execute() {
		//Model::instance()->registerProxy("pagesDataProxy",new PagesDataProxy());		
		Controller::instance()->addEventListener(ApplicationEvent::ACTION_DISPATCHED,new EventListener($this,"defaultEventHandler"));
	}
	
	public function defaultEventHandler(ApplicationEvent $e){
		Controller::instance()->dispatchEvent(new PageEvent(PageEvent::SHOW_PAGE,1));
	}
}

?>